Skip to content

fix: CI baseline follow-up — replay focus misfire, BUILD_MODE leak, PATH precedence#14

Merged
Fiona2016 merged 2 commits into
publishfrom
fix/ci-baseline-followup
Jun 12, 2026
Merged

fix: CI baseline follow-up — replay focus misfire, BUILD_MODE leak, PATH precedence#14
Fiona2016 merged 2 commits into
publishfrom
fix/ci-baseline-followup

Conversation

@Fiona2016

Copy link
Copy Markdown
Collaborator

Motivation

PR #13 was merged with three CI jobs red. This fixes all three root causes.

Changes

  1. Replay re-snapshot bug (Chromium e2e): createPageActivationObservable listens for focus/blur on window with capture: true, which also receives element-level focus/blur (they don't bubble but are captured). Moving focus between two inputs was misread as a page deactivate→reactivate cycle, producing a spurious view_change segment with a full snapshot — this broke the recorder masking scenarios and would also fire for real users tabbing through forms. Now only window-targeted focus/blur count.
  2. BUILD_MODE leak (Bundle and script tests): the job-level BUILD_MODE: release made test:script resolve SDK_VERSION to the package version instead of dev, failing 4 upload-source-maps specs. Scoped to the bundle build step.
  3. PATH precedence (Build, lint, typecheck): scripts/cli appended node_modules/.bin to PATH, so the runner's global TypeScript 6.x shadowed the repo-pinned 5.8.3 and emitted TS5107 deprecation errors. Now prepended.

Test instructions

  • yarn test:unit --single-run → 2652 SUCCESS
  • yarn test:e2e:ci → 444 passed
  • BUILD_MODE=release yarn test:script failure reproduced locally pre-fix; workflow now scopes the variable
  • scripts/cli typecheck test/apps/vanilla passes with repo tsc 5.8.3

🤖 Generated with Claude Code

Fiona2016 and others added 2 commits June 12, 2026 18:31
…ATH precedence

- pageActivationObservable: ignore element-level focus/blur captured at
  window; only window-targeted events indicate page (de)activation.
  Fixes spurious view_change full snapshots when moving focus between
  inputs (broke recorder masking e2e).
- ci.yml: scope BUILD_MODE=release to the bundle build step so script
  tests run in dev mode as their specs expect.
- scripts/cli: prepend node_modules/.bin to PATH so repo-pinned tsc
  wins over globally installed versions on CI runners.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rumViewEvents[1] is order-dependent: a view emits several update events
and custom_timings only appear on later updates, which made the
assertion flaky on CI. Resolve views by id and assert on the update
with the highest document_version, like the manually-tracked scenario.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Fiona2016 Fiona2016 merged commit d3fc4bc into publish Jun 12, 2026
5 checks passed
@Fiona2016 Fiona2016 deleted the fix/ci-baseline-followup branch June 12, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant